<template>
  <div>
    <h1>App</h1>

    <HelloVue name="张三" title="谢谢谢谢" @abcd="onAbcd" ref="helloRef">
      <button>点我呀</button>
    </HelloVue>
  </div>
</template>

<script setup>
import { onMounted, ref } from "vue";

// 引入组件就可以直接使用，不需要做注册
import HelloVue from "./components/Hello.vue";

const helloRef = ref();

onMounted(() => {
  console.log("helloRef", helloRef.value);

  helloRef.value.abc();
});

function onAbcd() {
  console.log("onAbcd");
}
</script>
